package com.mejlisse.gwt.request;

import org.springframework.roo.addon.gwt.RooGwtMirroredFrom;
import com.mejlisse.server.domain.News;
import com.google.gwt.requestfactory.shared.Service;
import com.google.gwt.requestfactory.shared.RecordListRequest;
import com.google.gwt.requestfactory.shared.RecordRequest;
import com.google.gwt.valuestore.shared.PropertyReference;
import com.google.gwt.requestfactory.shared.RequestObject;
import com.google.gwt.requestfactory.shared.Instance;
import com.mejlisse.gwt.request.NewsRecord;

@RooGwtMirroredFrom(News.class)
@Service(News.class)
public interface NewsRequest {

    abstract RecordListRequest<com.mejlisse.gwt.request.NewsRecord> findAllNews();

    abstract RecordRequest<com.mejlisse.gwt.request.NewsRecord> findNews(PropertyReference<Long> id);

    abstract RequestObject<java.lang.Long> countNews();

    abstract RecordListRequest<com.mejlisse.gwt.request.NewsRecord> findNewsEntries(int firstResult, int maxResults);

    @Instance
    abstract RequestObject<java.lang.Void> remove(NewsRecord record);

    @Instance
    abstract RequestObject<java.lang.Void> persist(NewsRecord record);
}
